package Main;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import Component.MyForm;
import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;

/**
 *
 * @author Alvis
 */
public abstract class GameState {

	Game game;
	protected MyForm form;

	public GameState(Game _game) {

		game = _game;
	}

	public void update(float t) {
	}

	public void draw(Graphics2D g) {

		form.draw(g);

	}

	public void keyPressed(KeyEvent e) {

		form.keyPressed(e);

	}

	public void keyReleased(KeyEvent e) {

		form.keyReleased(e);

	}

	public void mouseDragged(MouseEvent e) {

		form.mouseDragged(e);

	}

	public void mouseMoved(MouseEvent e) {

		form.mouseMoved(e);

	}

	public void mousePressed(MouseEvent e) {

		form.mousePressed(e);

	}

	public void mouseReleased(MouseEvent e) {
		if (form != null) {
			form.mouseReleased(e);
		}
	}
}
